package com.v.im.commonmodule.utils.response;

import java.io.Serializable;

public class ImResponse implements Serializable {

    public static ImResponse SUCCESS = new ImResponse(ImMessageCode.SUCCESS);
    public static ImResponse ERROR = new ImResponse(ImMessageCode.ERROR);

    private Integer code;

    private String msg;

    private Object data;

    public ImResponse(ImMessageCode imMessageCode, Object object) {
        this.code = imMessageCode.getCode();
        this.msg = imMessageCode.getMsg();
        this.data = object;
    }

    public ImResponse(ImMessageCode imMessageCode) {
        this.code = imMessageCode.getCode();
        this.msg = imMessageCode.getMsg();
    }

    public ImResponse(Integer code, String msg, Object object) {
        this.code = code;
        this.msg = msg;
        this.data = object;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
